<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div>

    </div>
    <script>
        // touch 触摸
        // touchstart   手指触摸到元素得时候
        var div1 = document.querySelector('div');

        div1.addEventListener('touchstart',function(){
            console.log('touchstart');
        });

        // touchmove     手指在元素上移动的时候
        div1.addEventListener('touchmove',function(){
            console.log('touchmove');
        });

        // touchend      手指离开元素的时候
        div1.addEventListener('touchend',function(){
            console.log('touchend');
        });

    </script>
</body>
</html>